<?php

namespace app\api\model;

use think\Model;

class Paylog extends Model
{
    public function UserInfo(){
        return $this->belongsTo('users');
    }
    public function Commodity(){
        return $this->belongsTo('commodity');
    }

    public function getStatusAttr($value){
        $status = [
            '0'     =>  '未处理',
            '1'     =>  '已完成',
            '2'     =>  '已关闭',
        ];
        return $status[$value];
    }

    public function cdk(){
        return $this->belongsTo('cdklog','id','shop_id');
    }
}